<h1>{{ survey_name }}</h1>
<form action="" method="POST">
{% csrf_token %}
{% for question in question_list %}
    {{ question.qnum }}. {{question.qtext}}
    {% if question.required %}
        <span style='color: red;'>*</span>
    {% endif %}
    <br>
    {% if question.qtype == "radio" %}
        {% for option in question.options %}
            <input type="radio" name="{{ question.qid }}" id="{{ option.id }}" value="{{ option.id }}">
            <label for="{{ option.id }}">{{ option.text }}</label>
            <br>
        {% endfor %}
    {% elif question.qtype == "checkbox" %}
        {% for option in question.options %}
            <input type="checkbox" name="{{ question.qid }}" id="{{ option.id }}" value="{{ option.id }}">
            <label for="{{ option.id }}">{{ option.text }}</label>
            <br>
        {% endfor %}
    {% else %}
        <input type="text" name="{{ question.qid }}" id="{{ option.id }}">
    {% endif %}
    <br>
{% endfor %}
<button type="submit">提交</button>
</form>